function uploadImageCommon(form_id,input_id,i=0) {
    var formData = new FormData($( "#"+form_id )[0]);
    var url = '/shop/Upload/uploadImg';
    if(i == 1){
        url = '/shop/Upload/uploadImg22';
    }
    $.ajax({
        url: url,
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
            	alert(returnData.msg);
            	return false;
			}
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadImageCommon1(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/shop/Upload/uploadImg1',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                return true;
            }else{
                alert(returnData.msg);
                return false;
            }
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}
function uploadVideoCommon(form_id,input_id) {
    var formData = new FormData($( "#"+form_id )[0]);
    $.ajax({
        url: '/shop/Upload/uploadVideo',
        data: formData,
        type: 'POST',
        async: false,//1，这四个要写上，否则点击没反应
        cache: false,//2
        contentType: false,//3
        processData: false,//4
        dataType: 'JSON',
        success: function (returnData) {
            if(returnData.code == 200){
                $( "#"+input_id).val(returnData.msg);
                $('.havevideo').text('上传完成！');
                return true;
            }else{
            	alert(returnData.msg);
                $('.havevideo').text(returnData.msg);
            	return false;
			}
        },
        error: function () {
            alert('服务器错误，请刷新重试！');
            return false;
        }
    })
}